/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package redSocial.entities;

import java.io.Serializable;
import java.math.BigDecimal;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

/**
 *
 * @author inftel
 */
@Entity
@Table(name = "INTERESES")
@NamedQueries({
    @NamedQuery(name = "Intereses.findAll", query = "SELECT i FROM Intereses i"),
    @NamedQuery(name = "Intereses.findByIdIntereses", query = "SELECT i FROM Intereses i WHERE i.idIntereses = :idIntereses"),
    @NamedQuery(name = "Intereses.findByDescripcion", query = "SELECT i FROM Intereses i WHERE i.descripcion = :descripcion")})
public class Intereses implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "ID_INTERESES")
    private BigDecimal idIntereses;
    @Column(name = "DESCRIPCION")
    private String descripcion;
    @JoinColumn(name = "ID_USUARIO", referencedColumnName = "ID_USUARIO")
    @ManyToOne
    private Perfil perfil;

    public Intereses() {
    }

    public Intereses(BigDecimal idIntereses) {
        this.idIntereses = idIntereses;
    }

    public BigDecimal getIdIntereses() {
        return idIntereses;
    }

    public void setIdIntereses(BigDecimal idIntereses) {
        this.idIntereses = idIntereses;
    }

    public String getDescripcion() {
        return descripcion;
    }

    public void setDescripcion(String descripcion) {
        this.descripcion = descripcion;
    }

    public Perfil getPerfil() {
        return perfil;
    }

    public void setPerfil(Perfil perfil) {
        this.perfil = perfil;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idIntereses != null ? idIntereses.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Intereses)) {
            return false;
        }
        Intereses other = (Intereses) object;
        if ((this.idIntereses == null && other.idIntereses != null) || (this.idIntereses != null && !this.idIntereses.equals(other.idIntereses))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "redSocial.entities.Intereses[idIntereses=" + idIntereses + "]";
    }

}
